import os,sys
def mkdir(path):    
    if not os.path.exists(path):
        os.makedirs(path)
    return path
def get_rootpath():
    path=os.path.realpath(sys.argv[0])
    if os.path.isdir(path):
        return path
    elif os.path.isfile(path):
        return os.path.dirname(path)      